let base = 'src'
console.log('---NODE_ENV:'+process.env.NODE_ENV)
if(process.env.NODE_ENV === 'production'){
    base = 'dist'
}
enum UserLevel {

    NoVerifyEmail = 0, // 未验证邮箱
    User,        // 普通用户
    Admin,       // 管理员
    SuperAdmin   // 超级管理员
}

enum LoginType {
    WeChat = 100,// 微信登录
    Email,       // 邮箱登录
}
export default class Config {
    /** 接口前缀 */
    public static readonly api_prefix = "/api/v1/";

    /** 上传图片存放目录 */
    public static readonly upload_path = "public/upload/images/";

    /** 上传图片大小限制 */
    public static readonly upload_img_size = 5 * 1024 * 1024;

    /** 根目录 */
    public static readonly base = base

    // 用户权限等级
    public static readonly UserLevel = UserLevel

    public static readonly security = { //token key 配置
        secretKey: 'abcdefg', //key
        expiresIn: 60*60*24*30 //过期时间
    }
    // 用户登录方式
    public static readonly LoginType = LoginType

    public static readonly clientURL = 'http://localhost:8080'

    public static readonly wx = {
        appId:'wx494fa336e358211d',
        appSecret:'5237858979272bd4ebf1e8f264ae5b16',
        loginUrl:'https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code'
    }
}
